/*****************************************************************************
 * $LastChangedDate: 2011-04-23 21:07:07 -0400 (Sat, 23 Apr 2011) $
 * @file
 * @author  Jim E. Brooks  http://www.palomino3d.org
 * @brief   Sun.
 *//*
 * LEGAL:   COPYRIGHT (C) 2008 JIM E. BROOKS
 *          THIS SOURCE CODE IS RELEASED UNDER THE TERMS
 *          OF THE GNU GENERAL PUBLIC LICENSE VERSION 2 (GPL 2).
 *****************************************************************************/

#ifndef SKY_SUN_HH
#define SKY_SUN_HH 1

#include <utility>
#include "world/debug.hh" // ASSERT_LAT_LON_DEG()

namespace sky {

////////////////////////////////////////////////////////////////////////////////
/// @brief Sun (stub).
///
/// Sun is a stub class.  It just holds the sun's (lat,lon) coordinates.
/// The sun is actually rendered by SkyDomePainter which paints the sun's aura.
/// In the future, Sun could be improved, perhaps by rendering a Sprite image.
///
/// Integration:
/// Sun is to be instantiated and contained by Sky.
///
class Sun : public Shared
{
PREVENT_COPYING(Sun)
public:
    Sun( const Degree lat, const Degree lon )
    :   mLat(lat), mLon(lon)
    {
        ASSERT_LAT_LON_DEG(lat,lon);
    }

    ~Sun()
    {
        // NOP
    }

    /// Set position of sun as (lat,lon).
    void
    SetLatLon( const std::pair<Degree,Degree>& latLon )
    {
        ASSERT_LAT_LON_DEG( latLon.first, latLon.second );
        mLat = latLon.first;
        mLon = latLon.second;
    }

    /// @return Position sun as (lat,lon).
    std::pair<Degree,Degree>
    GetLatLon( void )
    {
        return std::make_pair( mLat, mLon );
    }

private:
    Degree      mLat, mLon;     ///< position of sun (lat,lon)
};

} // namespace sky

#endif // SKY_SUN_HH
